package cn.wolfcode.springboot_consumer._02_send_way;

import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @Author: 乱梦天真
 * @Description: TODO
 * @Date: 2020/5/10 21:06
 */
@Component
@RocketMQMessageListener(
        consumerGroup = "wolfcode_consumer",
        topic = "02-boot-sendWay",
        messageModel = MessageModel.CLUSTERING
)
public class Consumer2 implements RocketMQListener<String> {
    @Override
    public void onMessage(String msg) {
        System.out.println("消费者2消费:"+msg);
    }
}